package com.youlai.boot.system.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum LpsOrderTypeEnum {

    CD_JG(1, "触动机构"),
    CD_JG_C(2, "触动机构+C"),
    XCP_XIAN(3, "新产品 线"),
    XCP(4, "新产品"),
    PJ(5, "配件"),
    YL(6, "永乐"),
    LJ(7, "利居"),
    FS(8, "扶手"),
    ;

    private final Integer type;
    private final String name;

    // 新增一个根据类型获取beanName的方法
    public static LpsOrderTypeEnum getByType(Long type) {
        for (LpsOrderTypeEnum value : values()) {
            if (value.type.equals(type)) {
                return value;
            }
        }
        return null;
    }

}